package com.supor.aiot.mine.api;

import com.android.baseconfig.base.BaseApiResult;
import com.android.baseconfig.base.BaseRetrofit;
import com.android.baseconfig.base.DataApiResult;
import com.supor.aiot.mine.bean.AppReleaseItem;

import java.util.List;

import io.reactivex.rxjava3.core.Observable;

public class AppReleaseImpl extends BaseRetrofit<AppReleaseService> implements AppReleaseService {

    private static AppReleaseImpl instance;

    public static AppReleaseImpl getInstance() {
        if (instance == null) {
            instance = new AppReleaseImpl();
        }
        return instance;
    }

    /**
     *
     * 查询APP更新记录
     *
     * @return Observable<BaseApiResult<DataApiResult<List<AppReleaseItem>>>>
     */
    @Override
    public Observable<BaseApiResult<DataApiResult<List<AppReleaseItem>>>> getAppReleaseListPage(String appOs, String appType, int page, int limit) {
        return api.getAppReleaseListPage(appOs, appType, page, limit).compose(this.applySchedulers());
    }
}
